package com.physics.mps.module.compute;

import com.physics.mps.entity.vo.ResponseResult;
import com.physics.mps.entity.vo.StartComputeVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mcsoft
 * @since 2023/8/26
 */
@Slf4j
@RestController
@RequestMapping("/compute")
@RequiredArgsConstructor
public class ComputeController {


    // ~ Variable & Constant
    // ========================================================================================================


    // ~ Public method
    // ========================================================================================================

    @PostMapping(value = "/startCompute")
    public ResponseResult startCompute(@RequestBody @Validated StartComputeVo startComputeVo) throws Exception {
        return ComputeService.compute(startComputeVo);
    }

    // ~ Override method
    // ========================================================================================================


    // ~ Private method
    // ========================================================================================================


    // ~ Autowired
    // ========================================================================================================

    private final ComputeServiceImpl ComputeService;

}
